<template>
  <div>
    <!-- <div class="header">
      <a-icon type="notification" /><strong style="margin-left: 10px"
        >公告</strong
      >
    </div> -->
    <a-list :grid="{ column: 1 }" :data-source="noticeData">
      <a-list-item slot="renderItem" slot-scope="item" style="width: 100%">
        <common-card :config="item" />
      </a-list-item>
    </a-list>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { getNotice } from '../api/Notice'
import CommonCard from '@/components/CommonCard.vue'
import Msg from '@/interface/Msg'
@Component({
  components: {
    CommonCard,
  },
})
export default class Notice extends Vue {
  //装着Notice对象的数组
  noticeData: Notice[] = []

  async getNoticeList() {
    let res: Msg = await getNotice()
    if (res.data.content) {
      this.noticeData = res.data.content
    }
  }

  created() {
    this.getNoticeList()
  }
}
</script>

<style scoped>
/* .container {
  width: 70%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px grey;
  margin: auto;
}
.header {
  margin-top: 15px;
  margin-bottom: 15px;
  padding-top: 15px;
} */
</style>
